package com.tc.modules.sys.service.impl;

import com.tc.modules.sys.mapper.SysUserRoleMapper;
import com.tc.modules.sys.model.entity.SysRole;
import com.tc.modules.sys.service.ISysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: tianchao
 * @Date: 2020/4/25 13:07
 * @Description:
 */
@Service
public class SysUserRoleServiceImpl implements ISysUserRoleService {

    @Autowired
    private SysUserRoleMapper sysUserRoleMapper;
    /**
     * 获取用户角色信息
     *
     * @param userId 用户id
     * @return 角色信息list
     */
    @Override
    public List<SysRole> selectRoleByUserId(String userId) {
        return sysUserRoleMapper.selectRoleByUserId(userId);
    }
}
